home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 November: Technology Seed / Mac Tech Seed Nov '96 / Mac Tech Seed Nov '96.toast / mac / QuickTime MPEG a6 / MPEG Read Me next >
Encoding:
Text File  |  1996-11-07  |  11.2 KB  |  183 lines  |  [ttro/ttxt]

  1.  
  2.  
  3.  
  4.  
  5.  
  6. QuickTime MPEG Extension 
  7.  
  8. The QuickTime MPEG extension works directly with QuickTime to provide complete playback and control of an MPEG bitstream within a QuickTime movie.
  9.  
  10. How does it work?
  11.  
  12. The QuickTime MPEG extension is not a simply a image decompressor component (codec). When you open an MPEG movie with the extension installed, QuickTime automatically imports the file into a QuickTime movie with a single MPEG track. The MPEG content is not contained in a video and/or audio track — rather, it has its own separate track type, like a Text or a Sprite track. This MPEG track handles both the video and the audio streams of an MPEG file. There is only a decompressor — no compressor (hence, you cannot compress a QuickTime movie with this Extension to create an MPEG file).
  13.  
  14. How do I report bugs or provide feedback?
  15.  
  16. The a6 version of the QuickTime MPEG Extension is likely a few revisions old by the time you receive the Macintosh Technology Seed CD.  To inquire about getting more involved with testing and feedback please contact the QuickTime evangelist, Charles Wiltgen <cwiltgen@apple.com> for more information. 
  17.  
  18. How do I install it?
  19.  
  20. To get started, make sure that QuickTime 2.5 is installed (the MPEG extension does not support earlier versions of QuickTime). Place the QuickTime MPEG extension in the Extensions folder of your System folder, and restart your machine. You should now be ready to go — try opening an MPEG file from MoviePlayer.
  21.  
  22. What do I need to use it?
  23.  
  24. • A Power Macintosh
  25. • QuickTime 2.5 and an application that can play movies (such as MoviePlayer 2.5 or SimpleText)
  26. • Approximately 2.5 MB of free memory per MPEG bitstream (for optimal playback)
  27.  
  28. Release Changes for version 1.0a6
  29.  
  30. • The fps displayed was fiddled so that it tracks the instantaneous display rate better. (The old scheme supplied a lon-term average with no aging.)
  31.  
  32.     • Some visual glitches were fixed.
  33.  
  34.     • A new version of ThreadsLib (2.1.4) is now installed. This should fix the problems with Internet Explorer, and with MediaPaint crashing at system shutdown.
  35.  
  36.     • Modified how we deal with low-memory problems when we're opened.
  37.  
  38.     • When an MPEG-2 video only stream is opened, it will be rejected as not acceptable. (What was happening was that we made a very slow and ultimately unsuccessful attempt to decode the stream as MPEG-1).
  39.  
  40.     • Fixed a potentially crashing bug. The inverse color tables used for 8-bit color dithering are shared across applications but had the potential to be allocated in the app heap of the first app to need it. This could obviously cause problems if subsequent apps were opened that used that table after the first app was quit.
  41.  
  42. Release Changes for version 1.0a5
  43.  
  44.  • The 'mpeg' Gestalt selector requested by Apple Video Player was added
  45.       (but appears to have no effect on AVP's behavior).
  46.  
  47.     • We can now work with the Thread Manager extension on System 7.1.2
  48.  
  49.     • MPEG audio layer 3 files will no longer crash. They will open and appear to behave normally except that no sound will be produced.
  50.  
  51.     • Modifications were made to speed up random access on video-only streams.
  52.  
  53.     • Streaming should now work with video-only streams.
  54.  
  55.     • Recovery after an error is reported by the data handler is dramatically improved. This can make streaming a lot more robust.
  56.  
  57.     • The 'mpeg' Gestalt selector is again installed.
  58.  
  59.     • On systems where the MPEG extension is alphabetically loaded before QuickTime, the MPEG icon was being drawn twice, once the first time it was loaded and then once again when QuickTime was loaded. Now fixed.
  60.  
  61.     • Opening MPEG2 files with now return cleanly with no file opened and no error.
  62.  
  63.     • MoviePlayer should now be able to disply the fps while MPEGs are playing.
  64.  
  65. Release Changes for version 1.0a4
  66.  
  67.     • GetMoviePict() should now generate the correct picture instead of always returning the same frame (usually the first frame of the movie).
  68.  
  69.     • Preroll was fiddled a little so that it's a lot faster on CD-ROMs.
  70.  
  71.     • Streaming for the Netscape plugin was added.
  72.  
  73.     • Playback is little less jerky.
  74.  
  75.     • Bilinear interpolation was added to 16-bit display. This makes the image look a WHOLE lot better when scaled up, and prevents the "ripple" effect one commonly saw on pans across 352x240 MPEGs scaled down to 320x240.  (Note that for now this has broken non-16bit display. This will be fixed in an upcoming build.)
  76.  
  77.     • Fixed problems related to pasting an audio-only stream into a video-only stream.
  78.       (This fix is not perfect. In particular the first time one plays the movie, when one hits the audio the video will jerk and the audio may start, drop out for a brief instant, then restart.   Subsequent plays through will be much smoother.  This will be fixed in a later build.)
  79.  
  80. Release Changes for version 1.0a3
  81.  
  82. Extended the extension time-out date to November 15.  The extension will not be active after that date and you will need to get a new version of the codec.
  83.  
  84. Release Changes for version 1.0a2
  85.  
  86. The following are now supported:
  87.  
  88. • “.mpa”, “.mpv” and “.mpm” file extensions
  89. • 'MPGa', 'MPGv', and 'MPGx' file types
  90.  
  91. Release Changes for version 1.0d9 (alpha 1)
  92.  
  93. The following are now supported:
  94.  
  95. • Elementary audio bitstreams
  96. • Kanji Talk System Software
  97. • System 7.1.2 (make sure you’ve installed the ThreadManager — see Things You Oughta Know). 
  98.  
  99. What features are supported with version 1.0d8 ?
  100.  
  101. • Supports playing MPEG-encoded movies from a local hard disk or over the network
  102.  
  103. • Supports playing MPEG-encoded movies from Video CD and CDi disks
  104.  
  105. • Supports display of MPEG video in all monitor display depths, with optimized performance for 8-, 16- and 32-bit depths
  106.  
  107. • Supports MPEG chapter information (chapters are displayed in the standard movie controller, and you can select chapters to go to particular spot in the MPEG bitstream) from Video CDs
  108.  
  109. • Supports standard QuickTime transport controls (play, pause, sound volume control, audio balance, frame-accurate step-forward and -backward, fast-forward, rewind).
  110.  
  111. • Supports arbitrary window resizing
  112.  
  113. • Supports standard QuickTime editing functions: cut, copy, paste, etc. (note: FlattenMovie works, but must copy the entire MPEG stream to do so)
  114.  
  115. • Support ability to play and utilize elementary MPEG streams (video only)
  116.  
  117. • Support movie layering, compositing, and graphics mode controls
  118.  
  119. • Support hardware acceleration of clipping, scaling, and color-space conversion (i.e. it utilizes the same mechanisms used to accelerate normal video)
  120.  
  121. Things You Oughta Know
  122.  
  123. • In order to run the MPEG extension with pre-7.5 systems, you must install the Thread Manager.   Once you install the ThreadManager in the Extensions folder of your System Folder, the MPEG extension should behave commensurate with 7.5 and up systems.
  124.  
  125. • On all versions of the system software you'll need to install the included ThreadsLib which is an update to the one included in the  System file.
  126.  
  127. • Blacklining is intentional. With large window sizes, blacklining saves CPU cycles.
  128.  
  129. • ClarisWorks’ Text Preview extension interferes with the MPEG file preview. The Text Preview extension (installed by ClarisWorks 3.0 and 4.0) causes applications to display text symbols rather than a movie clip in those applications’ Open Dialog Box movie preview window.
  130.  
  131. • When running long movies (20 minutes plus) from CDi disks, the synchronization of the audio and video intermittently cuts in and out. This will be addressed before the final release.
  132.  
  133. • Playback performance is CPU-dependent.  A Power Macintosh 7100/80Mhz/601 gets approximately 10–12 fps at a window size of 320 x 240, while a Power Macintosh 8500/120MHz/604 gets approximately 24 fps at a window size of  320 x 240.
  134.  
  135. • Use Save As, not Save, when you are saving changes to a raw MPEG bitstream from MoviePlayer.  Using Save will result in an error dialog.
  136.  
  137. • For best performance, make sure Macintosh is set to reproduce 44.1 kHz, 16-bit stereo sound, and that your color-depth is set to 256 or thousands.
  138.  
  139. Technical Note: Special considerations for the MPEG media type
  140.  
  141. If you want to have your application open up MPEG files directly as QuickTime movies, simply follow the same procedure you would for normal QuickTime movies. Use OpenMovieFile to open the MPEG file, use NewMovieFromFile to get the movie from the MPEG file (this will automatically perform the import operation for you), and use CloseMovieFile to close the MPEG file.
  142.  
  143. Some applications expect to find a video track and an audio track in the movie, and refuse to work with the movie if they don’t find one of these tracks. This will cause problems with QuickTime movies containing an MPEG track, as neither an audio or video track is present. Since QuickTime 2.0 there has been a convenient mechanism to find those tracks in a movie that play audio and those tracks which draw. This can be done using the GetIndTrackType call. GetIndTrackType can be used to interate through all tracks in a movie with a given characteristic. To find the visual tracks of a movie you would use code as follows:
  144.  
  145. long index = 0;
  146. Track t;
  147. while (t = GetMovieIndTrackType(theMovie, ++index, VisualMediaCharacteristic, movieTrackCharacteristic | movieTtackEnabledOnly) {
  148.     // this track draws - you can treat it as a video track
  149. }
  150.  
  151. To find the audio tracks of a movie, you would use the same code but substitue AudioMediaCharacteristic for VisualMediaCharacteristic. Note that this code works for all track types, and so is a good way to deal with all kinds of QuickTime media including sound, video, music, text, sprites, timecode, as well as MPEG.
  152.  
  153. If you need to determine the actual track type of the media returned, you can do so as follows:
  154.  
  155. OSType mediaType;
  156. GetMediaHandlerDescription(GetTrackMedia(theTrack), &mediaType, nil, nil);
  157.  
  158. You can then compare the value returned in the mediaType field against the constants for the various media types such as VideoMediaType, SoundMediaType, or MPEGMediaType.
  159.  
  160. The MPEG track may be the first to support both audio and video, but it won’t be the last. Taking the time now to ensure that your application can work well with QuickTime MPEG tracks will enhance your application’s overall ability to work with the large variety of QuickTime movies currently is use.
  161.  
  162. Technical Note: “Blacklining”
  163.  
  164. The MPEG track will use a technique called “blacklining” to draw frames when it is scaled above normal size. When using blacklining, every other line the image is drawn as a black line. This technique can significantly improve playback frame rates. However, if you are processing the MPEG frames you may want to turn off the black lining feature. The black lining feature is controlled by the quality level of the MPEG track. At normal quality and below, blacklining is used. At high quality, every line of the frame is always drawn. To set a track in a movie to high quality mode, use SetMediaPlayHints() as shown below:
  165.  
  166. Track mpegTrack;
  167. SetMediaPlayHints(GetTrackMedia(mpegTrack), hintsHighQuality, hintsHighQuality);
  168.  
  169. To restore a movie to normal quality, use SetMediaPlayHints() as shown below:
  170.  
  171. Track mpegTrack;
  172. SetMediaPlayHints(GetTrackMedia(mpegTrack), 0, hintsHighQuality);
  173.  
  174. Play hints are not normally saved with a movie. To save the play hints of a movie, use the track load settings as shown below.
  175.  
  176. Track mpegTrack;
  177. SetTrackLoadSettings(mpegTrack, 0, 0, 0, hintsHighQuality);
  178.  
  179. Enjoy!
  180.  
  181. — The QuickTime Engineering Team <qtmpeg10@apple.com>
  182. — Charles Wiltgen, QuickTime Technologies Evangelist <cwiltgen@apple.com>
  183.